<table width="100%" border="0" cellpadding="0" cellspacing="0" background="/images/mainpage-sliced_16.jpg">
  <tr>
    <td width="20" height="40">&nbsp;</td>
    <td class="style5" style="border-right:solid 1px #FFFFFF;">Cost Structure (per Milestone)</td>
  </tr>
</table>
<?php if ($milestones->count()==0){
  ?><p class="errormessage"><?php echo "There is no project data." ?></p><?php
}
else {
?>
<table>
  <thead>
    <tr align="center" class= "style2" background="/images/mainpage-sliced_11.jpg">
      <th>Milestone</th>
      <th>Tasks</th>
      <th>Resources</th>
      <th>Cost</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($milestones as $i => $milestone): ?>
    <tr align="center" class="regulartext_<?php echo fmod($i, 2) ? 'even' : 'odd' ?>">
      <td><a style="text-decoration:underline" href="<?php echo url_for('milestone/show/'.$milestone['milestoneid']); ?>"><?php echo $milestone['milestoneName']; ?></a></td>
      <td><?php echo number_format($milestone['taskCount']); ?></td>
      <td><?php echo number_format($milestone['resourceCount']); ?></td>
      <td><?php echo number_format($milestone['milestoneCost']); ?></td>
    </tr>
    <?php endforeach; ?>    
  </tbody>
</table>
<?php } ?>
<hr/>